fix(kad,mdns,misc): ensure instant is used instead of std::time#5391
Closed
zvolin wants to merge 4 commits intolibp2p:masterfrom
Closed
fix(kad,mdns,misc): ensure instant is used instead of std::time#5391zvolin wants to merge 4 commits intolibp2p:masterfrom
zvolin wants to merge 4 commits intolibp2p:masterfrom
Conversation
std::time is not implemented on platforms like browser wasm and it's usage fails with a runtime error. This ensures that instant is used everywhere as it is compatible with wasm environments.
Member
|
mdns would not be compatible with wasm, and for kad, please see #5347 EDIT: To clarify on mdns: it seems to rely on native sockets for its implementation. Not to say that this may change in the future to adapt for other implementation (if mdns is available on the browser beside discovering printers). May not be worth making the change there. |
Contributor
Author
|
closing in favor of #5347 then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
std::timeis not implemented on platforms like browser wasm and it's usage fails with a runtime error.This ensures that
instantis used everywhere as it is compatible with wasm environments.Notes & open questions
Change checklist